<?php
	class teams_db extends CI_Model{
		public function __construct()
		{
			$this->load->database();
		}
		public function get_teams()
		{
			$query = $this->db->get("all_schools");
			return $query->result_array();
		}
		
		public function get_a_team($school_name)
		{
			$query = $this->db->get_where("all_schools", array("school_name" => $school_name));
			$school_id = $query->result_array();
			$school_id = $school_id[0]["school_id"];
			$query = $this->db->get_where('season_stats', array("team_id" => $school_id));
			return $query->result_array();
		}
	}
?>